package com.monkey.luffer.springboot.demo.basis.springAop.OrderImpl;

import com.monkey.luffer.springboot.demo.basis.example.User;
import com.monkey.luffer.springboot.demo.basis.springAop.OrderService;
import com.monkey.luffer.springboot.demo.basis.springAop.annotion.Adapter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Author: dengkaibing
 * @Description:
 * @Date: 2021/2/25 11:23
 * @company 甜橙金融
 * @Version: 1.0
 */
@Slf4j
@Component
public class OrderServiceImpl implements OrderService {
    @Override
    @Adapter
    public String creatOrder(User arg, String string) {
        log.info("user:{},string:{}",arg,string);
        return "success";
    }

    @Override
    public void buyCar() {
        System.out.println("切面");
        User user = new User();
        creatOrder(user,"123");
    }
}
